<?php
namespace app\admin\controller;
use think\Db; //使用数据类库
use think\captcha\Captcha; //验证码
use think\facade\Session; //Session
use think\facade\Cookie; // cookie

class Logout extends \think\Controller
{
    //退出登录
    public function logout() {
        //删除session
        Cookie::set("admin_name","",-1);
//        Cookie::delete('admin_name');
        Session::delete('login');
        $this -> success('成功退出','/admin/login/login'); //重新跳转到登录界面
    }
}